package cn.flant.ftp;

public class FtpInfo {
	public static final int ACTIVE_MODEL = 0;
	public static final int PASSIVE_MODEL = 1;

	public static final int CONN_FTP = 0;
	public static final int CONN_FTPS = 1;

	private String host;
	private int port = 21;
	private String user;
	private String password;

	private int model = PASSIVE_MODEL;

	private int connectType = CONN_FTP;

	private String httpProxyHost;
	private int httpProxyPort;
	private String httpProxyUser;
	private String httpProxyPasssword;

	private boolean useHttpProxy;

	public FtpInfo() {
	}

	public FtpInfo(String host, int port, String user, String password) {
		this.host = host;
		this.port = port;
		this.user = user;
		this.password = password;
	}

	public String getHost() {
		return host;
	}

	public void setHost(String host) {
		this.host = host;
	}

	public int getPort() {
		return port;
	}

	public void setPort(int port) {
		this.port = port;
	}

	public String getUser() {
		return user;
	}

	public void setUser(String user) {
		this.user = user;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public int getModel() {
		return model;
	}

	public void setModel(int model) {
		this.model = model;
	}

	public int getConnectType() {
		return connectType;
	}

	public void setConnectType(int connectType) {
		this.connectType = connectType;
	}

	public void setHttpProxy(String proxyHost, int proxyPort, String proxyUser, String proxyPassword) {
		this.httpProxyHost = proxyHost;
		this.httpProxyPort = proxyPort;
		this.httpProxyUser = proxyUser;
		this.httpProxyPasssword = proxyPassword;
	}

	public void setHttpProxy(String proxyHost, int proxyPort) {
		setHttpProxy(proxyHost, proxyPort, "", "");
	}

	public boolean isUseHttpProxy() {
		return useHttpProxy;
	}

	public void setUseHttpProxy(boolean useHttpProxy) {
		this.useHttpProxy = useHttpProxy;
	}

	public String getHttpProxyHost() {
		return httpProxyHost;
	}

	public int getHttpProxyPort() {
		return httpProxyPort;
	}

	public String getHttpProxyUser() {
		return httpProxyUser;
	}

	public String getHttpProxyPasssword() {
		return httpProxyPasssword;
	}
}
